// let&const
<template>
  <div>
    <prism language="javascript">
      let bar="yuan"; //块级变量作用域
      const foo="lei"; //常量，块级作用域,不可以改变
      var a="local";
      foo="yuanlei"; //不可以改变
      bar="leiyuan";
      console.log(bar);
    </prism>
    <v-btn
      round
      color="success"
      @click="run"
    >
      RUN
    </v-btn>
  </div>
</template>

<script>
import Prism from 'vue-prism-component'
export default {
  components: {
    Prism
  },
  methods:{
    run() {
      let bar="yuan"; //块级变量作用域
      const foo="lei"; //常量，块级作用域,不可以改变
      var a="local";
      foo="yuanlei"; //不可以改变
      bar="leiyuan";
      console.log(bar);
    }
  }
};
</script>